import type { Moment } from 'moment';
import { DatePicker } from 'antd'
import { RangePickerProps } from 'antd/lib/date-picker/generatePicker';

const { RangePicker: AntRangePicker } = DatePicker
const RangePicker = (props: RangePickerProps<Moment>) => {
  return (
    <AntRangePicker
      showTime
      getPopupContainer={triggerNode => triggerNode.parentNode as HTMLElement}
      allowClear
      {...props}
    />
  )
}
export default RangePicker
